package user;

import operations.*;
import user.User;

import java.util.Scanner;

public class AdminUser extends User {   // 继承User类

    // 构造函数
    public AdminUser(String name) {
        super(name);

        // 对应管理员用户可执行的操作
        this.iOperation = new IOperation[]{
                new ExitOperaion(),
                new FindOperation(),
                new AddOperation(),
                new DelOperation(),
                new DisplayOperation()
        };
    }

    // 对应管理员用户的菜单
    public int menu(){
        System.out.println("****************************************");
        System.out.println("hello"+ "\t" + name+ "\t" + "欢迎使用图书管理系统");
        System.out.println("1.查找图书");
        System.out.println("2.新增图书");
        System.out.println("3.删除图书");
        System.out.println("4.显示图书");
        System.out.println("0.退出系统");
        System.out.println("****************************************");
        System.out.println("请输入选择");
        Scanner scanner = new Scanner(System.in);
        int choice = scanner.nextInt();
        return choice;
    }

}
